package Banner;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.anxiang.R;
import com.zhpan.bannerview.BannerViewPager;
import com.zhpan.bannerview.BaseBannerAdapter;
import com.zhpan.bannerview.BaseViewHolder;

/**
 * The type Banner adaper.
 */
public class BannerAdaper extends BaseBannerAdapter<BannerData> {
    @Override
    protected void bindData(BaseViewHolder<BannerData> holder, BannerData data, int position, int pageSize) {
        ImageView imageView=holder.findViewById(R.id.banner_image);
        Glide.with(imageView).load(data.getImageUrl()).into(imageView);
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.banner_item;
    }
}
